package com.szr.cloud.springboot_hello.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.szr.cloud.springboot_hello.dao.UserJpaDao;
import com.szr.cloud.springboot_hello.model.User;
import com.szr.cloud.springboot_hello.service.UserServiceI;

@Service("userService")
public class UserServiceImpl implements UserServiceI{

	@Autowired
	private UserJpaDao userJpaDao;
	
	@Override
	public User getUserByName(String username) {
		
		return userJpaDao.findByName(username);
	}

	@Override
	public void saveUser(User user) {
		userJpaDao.save(user);
	}

}
